package edu.jptest.serviceImp;

import java.util.List;

import edu.jptest.bean.TestPoint;
import edu.jptest.dao.TestPointDAO;
import edu.jptest.service.ITestPointService;

public class TestPointService implements ITestPointService {
	
	// 插入考点��ӿ���
	public boolean insertTestPoint(TestPoint testPoint) {
		TestPointDAO testPointDao = new TestPointDAO();
		return testPointDao.insertTestPoint(testPoint);
	}

	// 修改考点��Ŀ���
	public boolean updateTestPoint(TestPoint testPoint) {
		TestPointDAO testPointDao = new TestPointDAO();
		return testPointDao.updateTestPoint(testPoint);
	}

	// 删除考点
	public boolean deleteTestPoint(int testPointId) {
		TestPointDAO testPointDao = new TestPointDAO();
		return testPointDao.deleteTestPoint(testPointId);
	}

	// 通过考点id，查询考点对象
	public TestPoint getTestPointByTestPointId(int testPoint_id) {
		TestPointDAO testPointDao = new TestPointDAO();
		return testPointDao.getTestPointByTestPointId(testPoint_id);
	}

	// 获得所有大考点
	public List<String> getTestPointsType() {
		TestPointDAO testPointDao = new TestPointDAO();
		return testPointDao.getTestPointsType();
	}
	
	// 获得所有考点
	public List<TestPoint> getAllTestPoints(){
		TestPointDAO testPointDAO=new TestPointDAO();
		return testPointDAO.getAllTestPoints();
	}

	// 通过大考点，查询所具有的小考点
	public List<String> getTestPointsContentByType(String testpoint_type) {
		TestPointDAO testPointDao = new TestPointDAO();
		return testPointDao.getTestPointsContentByType(testpoint_type);
	}

	// 通过大考点、小考点，查询考点id
	public int getTestPointIdByContent(String type, String content) {
		TestPointDAO testPointDao = new TestPointDAO();
		return testPointDao.getTestPointIdByContent(type, content);
	}
}
